package com.zssj.servise;

import com.zssj.framework.service.BaseService;
import com.zssj.model.dto.MenuDTO;
import com.zssj.model.dto.MenuTreeDTO;
import com.zssj.model.entity.SysMenu;

import java.util.List;
import java.util.Set;

/**
 * @项目名: rzccc_home
 * @描述: 菜单服务接口
 * @作者: 杜文骄
 * @时间: 2020-10-03 09:45
 **/
public interface ISysMenuService extends BaseService<SysMenu> {
    /**
     * 保存菜单
     *
     * @param menu
     * @param resourceIds
     */
    void saveMenu(SysMenu menu, List<String> resourceIds);

    /**
     * 修改菜单
     *
     * @param menu
     * @param resourceIds
     */
    void updateMenu(SysMenu menu, List<String> resourceIds);

    /**
     * 递归删除菜单
     *
     * @param menuId
     */
    void removeMenu(Long menuId);


    /**
     * 获取菜单详情
     *
     * @param menuId
     * @return
     */
    MenuDTO getMenuDTODetails(Long menuId);

    /**
     * 获取用户权限菜单
     *
     * @param uid
     * @return
     */
    List<MenuTreeDTO> getUserPermMenus(Long uid);
    List<MenuTreeDTO> getAllMenuList(Long uid);

    /**
     * 获取用户按钮权限
     *
     * @param uid
     * @return
     */
    Set<String> getUserPermButtonAliases(Long uid);
    List<String> getUserPermVillage(Long userId);


    //获取所有菜单
    List<SysMenu> getList();

}
